from utils.client import APIClient
from utils.yaml_config import get_yaml


data = get_yaml('data_role.yaml')

class Api_Data_Role:


    def __init__(self,client:APIClient):
        self.client = client

    def data_role_list(self):
        data_role_data = data['list']['request']
        return self.client.request(data_role_data['method'],data_role_data['path'],json=data_role_data['json'])
    
    def data_role_save(self):
        data_role_data = data['save']['request']
        return self.client.request(data_role_data['method'],data_role_data['path'],json=data_role_data['json'])
    
    def data_role_set(self):
        data_role_data = data['set']['request']
        return self.client.request(data_role_data['method'],data_role_data['path'],json=data_role_data['json'])
    
    def data_role_get(self):
        data_role_data = data['save']['request']
        return self.client.request(data_role_data['method'],data_role_data['path'],json=data_role_data['json'])
    
    
